$(function(){
    //导航条下拉菜单
    $("#nav ul>li").each(function(i){
        this.idx=i+1;
    }).mouseover(function(){
        $("#nav>ul>li:nth-child("+this.idx+") .navhidediv").toggle();
    }).mouseout(function(){
        $("#nav>ul>li:nth-child("+this.idx+") .navhidediv").toggle();
    });
    //选择框下拉
    $("#selectDiv").mouseover(function(){
        $("#selectDiv ul").toggle();
        $("#selectDiv ul>li").click(function(){
            $("#selectDiv>span").html("搜"+$(this).html());
        }).mouseover(function(){
            $(this).css("background","#ddd");
        }).mouseout(function(){
            $(this).css("background","#fff");
        });
    }).mouseout(function(){
        $("#selectDiv ul").toggle();
    });
    //菜单栏切换
    $("#focusnav ul>li").each(function(i) {
        this.idx = i + 1;
    }).mouseover(function(){
        $("li:nth-child("+this.idx+") .hidediv").toggle();
        $("#focusnav ul>li:nth-child("+this.idx+")").addClass("focus");
        $("#focusnav li:nth-child("+this.idx+")>.inner").css({borderBottom:"1px dotted #fff"});
    }).mouseout(function(){
        $("li:nth-child("+this.idx+") .hidediv").toggle();
        $("#focusnav ul>li:nth-child("+this.idx+")").removeClass("focus");
        $("#focusnav li:nth-child("+this.idx+")>.inner").css({borderBottom:"1px dotted #d8d8d8"});
    });
    $("#focusnav").mouseover(function(){
        $(this).css({borderRight:"1px solid #d8d8d8"});
    }).mouseout(function(){
        $(this).css({borderRight:"1px solid #ff4466"});
    })
});
